package cn.itcast.log4j;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.springframework.web.context.ContextLoader;

public class App {

    private Log log = LogFactory.getLog(App.class);
    // 日志输出级别： debug<info<warn<error
    @Test
    public void testLog(){
        try {
            log.debug("调试信息..");
            log.info("执行信息...");
            log.warn("警告信息...");

        } catch (Exception e) {
            e.printStackTrace();
            log.error("错误信息...");
        }
    }
}
